//
//  SDPersonalCenterVC.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/4/12.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "SDPersonalCenterVC.h"
#import "FRUtils.h"
#import "AccountViewController.h"

@interface SDPersonalCenterVC ()

@end

@implementation SDPersonalCenterVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.hidden = YES;
    [self setButtonBg];

}

- (void)setButtonBg
{
    self.headerBgImage.image = [FRUtils circleImage:[UIImage imageNamed:@"head_bg"] withParam:0.5];
    self.headerImage.image = [FRUtils circleImage:[UIImage imageNamed:@"user_header"] withParam:0.5];
    
    [self.payforButton setImage:[UIImage imageNamed:@"obligation_logo"] forState:UIControlStateNormal];
    [self.payforButton setImageEdgeInsets:UIEdgeInsetsMake(-20, 40, 0, 0)];
    [self.payforButton setTitle:@"待付款" forState:UIControlStateNormal];
    [self.payforButton setTitleEdgeInsets:UIEdgeInsetsMake(40, -45, 0, 0)];
    
    [self.collectionButton setImage:[UIImage imageNamed:@"waiting"] forState:UIControlStateNormal];
    [self.collectionButton setImageEdgeInsets:UIEdgeInsetsMake(-20, 40, 0, 0)];
    [self.collectionButton setTitle:@"待收货" forState:UIControlStateNormal];
    [self.collectionButton setTitleEdgeInsets:UIEdgeInsetsMake(40, -40, 0, 0)];
    
    [self.huiyiButton setImage:[UIImage imageNamed:@"my_hy_logo"] forState:UIControlStateNormal];
    [self.huiyiButton setImageEdgeInsets:UIEdgeInsetsMake(-20, 40, 0, 0)];
    [self.huiyiButton setTitle:@"我的汇益" forState:UIControlStateNormal];
    [self.huiyiButton setTitleEdgeInsets:UIEdgeInsetsMake(40, -30, 0, 0)];
    
    [self.nextButton setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
    [self.nextButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.nextButton setTitle:@"账户管理 >" forState:UIControlStateNormal];
    [self.nextButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    
    //设置圆角的label
    self.numberLabe.text = @"115";
    self.numberLabe.textColor = [UIColor whiteColor];
    self.numberLabe.font = [UIFont systemFontOfSize:9];
    self.numberLabe.layer.backgroundColor = [UIColor colorWithRed:200/255.0 green:0/255.0 blue:0/255.0 alpha:1].CGColor;
    self.numberLabe.layer.cornerRadius = 5;
    
    self.lineImage.image = [UIImage imageNamed:@"separate_line"];
}

#pragma mark - ButtonClick

- (IBAction)payforButton:(id)sender {
}
- (IBAction)collectionButton:(id)sender {
}
- (IBAction)huiyiButton:(id)sender {
}
- (IBAction)nextButton:(id)sender
{
    AccountViewController *accountVC = [[AccountViewController alloc] init];
    [self.navigationController pushViewController:accountVC animated:YES];
}


- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    //设置状态栏颜色
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    self.tabBarController.tabBar.hidden = NO;
    
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
